package com.jboost.modules.app.service.strategry.hx;


import com.alibaba.fastjson.JSONObject;
import com.jboost.common.util.JSONUtil;
import com.jboost.modules.app.constant.BaseResult;
import com.jboost.modules.app.dto.huixin.HxProductDetailDto;
import com.jboost.modules.system.entity.FhdProductDz;
import com.jboost.modules.system.entity.HxProduct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service(value = "HxProductQuery")
@Slf4j
public class HxProductQuery extends AbstractHxPoduct<JSONObject, Boolean> {

    public String getFormId() {
        return "641c4a117e200a0007e8f0c9";
    }

    @Async
    @Scheduled(cron = "0 0/3 * * * ?")
    public BaseResult<Boolean> invokeStrategy() throws Exception {
        HxProduct hxProduct = new HxProduct();
        hxProduct.setType(1);
        sync(hxProduct);
        return BaseResult.success();
    }
}
